home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
Sample.bin
/
AnimatorClass.java
< prev
next >
Wrap
Text File
|
1998-10-28
|
6KB
|
151 lines
/*
A basic extension of the java.applet.Applet class
*/
import java.awt.*;
import java.applet.*;
import symantec.itools.multimedia.Animator;
import symantec.itools.awt.Label3D;
import symantec.itools.awt.VerticalSlider;
import symantec.itools.multimedia.*;
import symantec.itools.awt.*;
public class AnimatorClass extends Applet
{
public void init()
{
// Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
symantec.itools.lang.Context.setApplet(this);
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS
setLayout(null);
setBackground(new java.awt.Color(255,181,0));
setForeground(java.awt.Color.black);
setFont(new Font("Dialog", Font.PLAIN, 12));
setSize(528,432);
try {
animator1.setDelay(100);
}
catch(java.beans.PropertyVetoException e) { }
try {
java.net.URL[] tempURL = new java.net.URL[37];
tempURL[0] = symantec.itools.net.RelativeURL.getURL("1.GIF");
tempURL[1] = symantec.itools.net.RelativeURL.getURL("2.GIF");
tempURL[2] = symantec.itools.net.RelativeURL.getURL("3.GIF");
tempURL[3] = symantec.itools.net.RelativeURL.getURL("4.GIF");
tempURL[4] = symantec.itools.net.RelativeURL.getURL("5.GIF");
tempURL[5] = symantec.itools.net.RelativeURL.getURL("6.GIF");
tempURL[6] = symantec.itools.net.RelativeURL.getURL("7.GIF");
tempURL[7] = symantec.itools.net.RelativeURL.getURL("8.GIF");
tempURL[8] = symantec.itools.net.RelativeURL.getURL("9.GIF");
tempURL[9] = symantec.itools.net.RelativeURL.getURL("10.GIF");
tempURL[10] = symantec.itools.net.RelativeURL.getURL("11.GIF");
tempURL[11] = symantec.itools.net.RelativeURL.getURL("12.GIF");
tempURL[12] = symantec.itools.net.RelativeURL.getURL("13.GIF");
tempURL[13] = symantec.itools.net.RelativeURL.getURL("14.GIF");
tempURL[14] = symantec.itools.net.RelativeURL.getURL("15.GIF");
tempURL[15] = symantec.itools.net.RelativeURL.getURL("16.GIF");
tempURL[16] = symantec.itools.net.RelativeURL.getURL("17.GIF");
tempURL[17] = symantec.itools.net.RelativeURL.getURL("18.GIF");
tempURL[18] = symantec.itools.net.RelativeURL.getURL("19.GIF");
tempURL[19] = symantec.itools.net.RelativeURL.getURL("20.GIF");
tempURL[20] = symantec.itools.net.RelativeURL.getURL("21.GIF");
tempURL[21] = symantec.itools.net.RelativeURL.getURL("22.GIF");
tempURL[22] = symantec.itools.net.RelativeURL.getURL("23.GIF");
tempURL[23] = symantec.itools.net.RelativeURL.getURL("24.GIF");
tempURL[24] = symantec.itools.net.RelativeURL.getURL("25.GIF");
tempURL[25] = symantec.itools.net.RelativeURL.getURL("26.GIF");
tempURL[26] = symantec.itools.net.RelativeURL.getURL("27.GIF");
tempURL[27] = symantec.itools.net.RelativeURL.getURL("28.GIF");
tempURL[28] = symantec.itools.net.RelativeURL.getURL("29.GIF");
tempURL[29] = symantec.itools.net.RelativeURL.getURL("30.GIF");
tempURL[30] = symantec.itools.net.RelativeURL.getURL("31.GIF");
tempURL[31] = symantec.itools.net.RelativeURL.getURL("32.GIF");
tempURL[32] = symantec.itools.net.RelativeURL.getURL("33.GIF");
tempURL[33] = symantec.itools.net.RelativeURL.getURL("34.GIF");
tempURL[34] = symantec.itools.net.RelativeURL.getURL("35.GIF");
tempURL[35] = symantec.itools.net.RelativeURL.getURL("36.GIF");
tempURL[36] = symantec.itools.net.RelativeURL.getURL("37.GIF");
animator1.setImageList(tempURL);
}
catch (java.net.MalformedURLException error) { }
catch(java.beans.PropertyVetoException e) { }
add(animator1);
animator1.setBounds(85,332,353,70);
try {
verticalSlider1.setMaxValue(200);
}
catch(java.beans.PropertyVetoException e) { }
try {
verticalSlider1.setValue(100);
}
catch(java.beans.PropertyVetoException e) { }
try {
verticalSlider1.setTickFreq(10);
}
catch(java.beans.PropertyVetoException e) { }
add(verticalSlider1);
verticalSlider1.setBounds(5,74,535,232);
try {
label3D1.setText("Visual Cafe");
}
catch(java.beans.PropertyVetoException e) { }
try {
label3D1.setBorderIndent(symantec.itools.awt.Label3D.INDENT_TWO);
}
catch(java.beans.PropertyVetoException e) { }
add(label3D1);
label3D1.setFont(new Font("TimesRoman", Font.PLAIN, 64));
label3D1.setBounds(2,2,536,70);
//}}
//{{REGISTER_LISTENERS
SymAction lSymAction = new SymAction();
verticalSlider1.addActionListener(lSymAction);
//}}
}
//{{DECLARE_CONTROLS
symantec.itools.multimedia.Animator animator1 = new symantec.itools.multimedia.Animator();
symantec.itools.awt.VerticalSlider verticalSlider1 = new symantec.itools.awt.VerticalSlider();
symantec.itools.awt.Label3D label3D1 = new symantec.itools.awt.Label3D();
//}}
class SymAction implements java.awt.event.ActionListener
{
public void actionPerformed(java.awt.event.ActionEvent event)
{
Object object = event.getSource();
if (object == verticalSlider1)
verticalSlider1_actionPerformed(event);
}
}
void verticalSlider1_actionPerformed(java.awt.event.ActionEvent event)
{
// to do: code goes here.
verticalSlider1_actionPerformed_Interaction1(event);
}
void verticalSlider1_actionPerformed_Interaction1(java.awt.event.ActionEvent event)
{
try {
// verticalSlider1 Get the current value of the VerticalSlider
animator1.setDelay(verticalSlider1.getValue());
} catch (Exception e) {
}
}
}